package com.example.examoj.service;

import com.example.examoj.dao.Problem;
import com.example.examoj.dao.User;
import com.example.examoj.dao.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserService {
    @Autowired
    public UserMapper userMapper;
    public User selectOneByName(String username) {
        User user= userMapper.queryByUserName(username);
        return user;
    }
    public int insertUser(User user){
        return userMapper.insertUser(user);
    }

    public void deleteUser(int id) {
        userMapper.deleteUser(id);
    }


}
